-- GENERATED SPELL FOR [Warden Icoshock] --


function spell0_20770(pUnit, Event) --@Shadowsurge,n/a--
pUnit:FullCastSpellOnTarget(36517,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20770', 594, 1)
end

function spell1_20770(pUnit, Event) --@Shadowtouched,Self--
pUnit:FullCastSpellOnTarget(36515,pUnit)
pUnit:RegisterEvent('Sorts_20770', 624, 1)
end

function Sorts_20770(pUnit, Event)
local choix_sorts_20770 = math.random(0, 1)
if choix_sorts_20770 == 0 then
pUnit:RegisterEvent('spell0_20770', 1, 1)
end
if choix_sorts_20770 == 1 then
pUnit:RegisterEvent('spell1_20770', 1, 1)
end
end

function mob20770_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20770', math.random(1500, 3000), 1)
end

function mob20770_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20770_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20770_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20770, 1, 'mob20770_Action')
RegisterUnitEvent(20770, 2, 'mob20770_Leave')
RegisterUnitEvent(20770, 3, 'mob20770_Kill')
RegisterUnitEvent(20770, 4, 'mob20770_Die')
